package com.example.lifecycle.slice;

import com.example.lifecycle.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class MainAbilitySlice extends AbilitySlice {
    static final HiLogLabel loglabel = new HiLogLabel(HiLog.LOG_APP, 0x00101, "MainAbilitySlice");
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        HiLog.info(loglabel, "onStart");
    }

    @Override
    public void onActive() {
        super.onActive();
        HiLog.info(loglabel, "onActive");
    }


    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
        HiLog.info(loglabel, "onForeground");
    }

    @Override
    protected void onBackground() {
        super.onBackground();
        HiLog.info(loglabel, "onBackground");
    }

    @Override
    protected void onInactive() {
        super.onInactive();
        HiLog.info(loglabel, "onInactive");
    }

    @Override
    protected void onStop() {
        super.onStop();
        HiLog.info(loglabel, "onStop");
    }
}
